PHP Programing language

adplus-dvertising
How to create a Number pyramid
Previous Home Next
<html>
<head>
<title>Number Pyramid</title>
</head>
<body>
<?php
$r;
$c;
for($r=1;$r<=5;$r++)
{
for($c=1;$c<=$r;$c++)
{
print("$r");
}
print "<br>";
}
?>
</body>
</html>
output
1
22
333
4444
55555 
Previous Home Next